package com.study.rabbit.subscibe;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
 * @description ProducerTest
 * @author TDW
 * @date 2018年10月29日
 *
 */
public class SubscibeStartTest {

	private static RabbitTemplate rabbitTemplate;
	
	public static void main(String[] args) {
		start();
		//start();
	}
	
	public static void start(){
		ApplicationContext ac = new ClassPathXmlApplicationContext("MQContext-subscibe.xml");
		rabbitTemplate = (RabbitTemplate) ac.getBean("amqpTemplate");
		System.out.println("listener已经启动");
	}
	
}
